clear
graph set window fontface "LM Roman 10"

import excel "MUNI.xlsx", sheet("Sheet1") firstrow 
drop dif

gen dm = mofd(d)
format dm %tm
collapse AAA AA, by(dm)
tsset dm, monthly
gen dif=AA-AAA

twoway (line AAA dm, lcolor(black) lwidth(2pt) lpattern(solid)) ///
	   (line AA  dm, lcolor(black) lwidth(2pt) lpattern(dash)) ///
	   (line dif dm, lcolor(black) lwidth(2pt) lpattern(shortdash)), ///
	   yline(0,lcolor(black) lwidth(thin) lpattern(shortdash)) ///
	   graphregion(color(white)) plotregion(margin(zero)) plotregion(margin(l+4 r+4)) xlabel(,nogrid) ylabel(,nogrid) /// 
	   title("U.S. AAA/AA Municipal Bond Yields", size(medium) color(black)) ///
	   ytitle("Percent", height(4.5)) ylabel(-1.00 " " 0.00 "0" 1.00 "1" 2.00 "2"  3.00 "3" 4.00 "4" 5.00 "5" 6.00 "6" 7.00 "7" 8.00 "8", tp(i) labgap(1.5) angle(0)) /// 
	   xtitle("") tlabel(2010m1 "2010" 2012m1 "2012" 2014m1 "2014" 2016m1 "2016" 2018m1 "2018", tp(i) labgap(1.2)) ///
	   legend(lab(1 "AAA") lab(2 "AA") lab(3 "AA{&minus}AAA") rows(1)) 
*graph export "fig9b.eps", replace
